package com.xiaochun.jiankangapp.model

import android.os.Parcelable
import kotlinx.parcelize.Parcelize
import java.io.File

@Parcelize
data class ReportFileModel(var path: String) : Parcelable {
    var file: File = File(path)
    var url: String? = null
    var reportModel: ReportModel? = null


    /**
     * 服务器数据
     */
    val isServerData get() = reportModel != null

    /**
     * 本地数据
     */
    val isLocalData get() = !isServerData


    val imageUrl: String? get() = path


    val name: String? get() = reportModel?.name ?: file.name
}